package kevin.study.zephyr.util;

/**
 * String 的工具类
 * 
 * HISTORY
 * 
 * 2007-12-17 创建
 * 
 * @author ye.li
 * @createtime 2007-12-17 下午05:26:09
 * 
 */
public final class StringUtils {
	/**
	 * default constructor
	 */
	private StringUtils() {
	}

	/**
	 * Check that the given String is neither <code>null</code> nor of length
	 * 0. Note: Will return <code>true</code> for a String that purely
	 * consists of whitespace.
	 * <p>
	 * 
	 * <pre>
	 * StringUtils.hasLength(null) = false
	 * StringUtils.hasLength(&quot;&quot;) = false
	 * StringUtils.hasLength(&quot; &quot;) = true
	 * StringUtils.hasLength(&quot;Hello&quot;) = true
	 * </pre>
	 * 
	 * @param str
	 *            the String to check (may be <code>null</code>)
	 * @return <code>true</code> if the String is not null and has length
	 */
	public static boolean hasLength(String str) {
		return (str != null && str.length() > 0);
	}

}
